﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Enterprise.Infrastructure;
using Enterprise.Service.Vote;
using Enterprise.Model.Vote;
using Enterprise.Control;
namespace Enterprise.UI.Web.Modules.Vote
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                CreateBT.AddButton("new.gif", "发起调查", "Manage.aspx?vId=" + Guid.NewGuid(), Utility.PopedomType.New, HeadMenu1);
                OnStart();
            }
        }

        private void OnStart()
        {
            VoteService vService = new VoteService();
            var list = vService.VoteList();
            GridView1.DataSource = list;
            GridView1.DataBind();
        }

    }
}